package cn.sintang.test.annotation.fruit;

import java.lang.annotation.*;

/**
 * 水果颜色注解
 * @author txy
 * @date 2017/12/7 16:13
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface FruitColor {
    public enum Color {
        GREEN("绿"),RED("红"),BLUE("蓝");

        private String name;
        Color(String name){
            this.name = name;
        }

        public String getName() {
            return name;
        }
    };

    Color fruitColor() default Color.GREEN;
}
